<!DOCTYPE html>
<html>
<head>
<title> MessageChannel: port message queue is initially disabled </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id=log></div>
<script>

    var TestResult = true;

    var t = async_test("Test Description: A port message queue can be enabled or disabled, and is initially disabled.");

    var channel = new MessageChannel();

    channel.port2.addEventListener("message", TestMessageEvent, true);

    channel.port1.postMessage("ping");

    setTimeout(t.step_func(VerifyResult), 100);

    function TestMessageEvent(evt)
    {
        TestResult = false;
    }

    function VerifyResult()
    {
        assert_true(TestResult, "Port message queue is initially disabled?");
        t.done();
    }
</script>
</body>
</html>
